package com.gaohe.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gaohe.pojo.Classes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClassesMapper extends BaseMapper<Classes> {

    @Select("select classes.id,classes.name,classes.tname,classes.tags,classes.pnum," +
            "classes.pmax,classes.room_name " +
            "from user_class,user,classes where user.id=${id} " +
            "and user_class.user_id=user.id " +
            "and user_class.class_id=classes.id")
    List<Classes> getStudentAllPickedClass(Long userid);
}
